<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta content="text/html; charset=utf-8" http-equiv="Content-type">
    <title><?php print $page_title; ?></title>
    <meta content="electronic teamwork assessment tool" name="description">
	<meta content="electronic, teamwork, assessment, teamwork assessment, participation metrics" name="keywords">
<?php
	foreach($style_sheet as $css) {
		if(file_exists(ROOT . BRANCH . "/includes/css/$css.css"))
		print "<link href='/includes/css/$css.css' rel='stylesheet' type='text/css'>";
	}
	foreach($java_script as $js) {
		if(file_exists(ROOT . BRANCH . "/includes/js/$js.js"))
		print "<script language='JavaScript' type='text/javascript' src='/includes/js/$js.js'></script>";
	}
?>
</head>
<body>
<div id="wrapper">
<div id="fade" class='invisible' onclick='closePopup();'></div>
<div id="page-container">
<?php
if(isset($_GET['m']) || isset($_SESSION['m'])) {
	$m = $_GET['m']? $_GET['m'] : $_SESSION['m'];
	unset($_SESSION['m']);
	switch($m) {
		case '1': $msg = "Logged out successfully"; break;
		case '2': $msg = "Invalid Username/Password, Please try again"; break;
		case '3': $msg = "You need to be logged in to view that page"; break;
		case '4': $msg = "Password reset successful, please check your email"; break;
		case '5': $msg = "Sorry, you cannot access that file."; break;
		case '6': $msg = "Sorry, that Email Address was not found in our database. Please contact the Administrator"; break;
		case '7': $msg = "Sorry, you need to be invited first in order to register. Please contact the Administrator."; break;
		case '8': $msg = "the user already exists...Please try again."; break;
	}
}
if(isLoggedIn()) {
	require_once('logout.php');
?>
<div id="logo"><img src="./includes/images/logo.png" /></div>
<div id="nav">
	<ul>
		<li><?php print anchor('./myetat.php','My eTAT').'>'.$course->title; ?></li>
	</ul>
</div>
<?php
} else{
?>
<img src="includes/images/index.jpg" />
<div id="nav">
	<ul>
		<center>
		<li>eTAT : Web based Teamwork Assessment Tool, CS Dept @ SFSU</li>
		</center>
	</ul>
</div>
<?php } printMsg($msg); unset($_SESSION['m']); ?>